
local log=ngx.log

function req_header_ctl()
	--local req_headers=ngx.req.get_headers()
	--ngx.say("get UserAgent:", req_headers["User-Agent"])

	--modify header
	ngx.req.set_header("Host", "New Host")

	--add new header
	ngx.req.set_header("NewHeader", "NewHeader111")

	--delete header
	--ngx.req.clear_header("Header1")
	ngx.req.set_header("Header1", nil)
end

req_header_ctl()


